import QtQuick 2.0

Item {
    id: root
    width: container.childrenRect.width
    height: container.childrenRect.height
    property alias text: label.text
    property alias source: image.source
    signal clicked

    Column{
        id: container

        Image {
            width:100;height: 100

            id: image

        }
        Text {
            id: label
            width: image.width
            //自动换行
            wrapMode: Text.WordWrap
            //排版
            horizontalAlignment: Text.AlignHCenter
            color: '#ececec'
        }
    }

    MouseArea{
        anchors.fill: parent
        onClicked: root.clicked()
    }
}
